/**
 * 健康度
 *
 * Created by snowingsea on 2020/01/22.
 */

/**
 * 心跳
 * @param req
 * @param res
 * @param next
 */
function ping(req, res, next) { // eslint-disable-line no-unused-vars
  res.json({
    message: 'pong',
    timestamp: Date.now(),
  });
}

/**
 * Export model definition object.
 */
module.exports = (app, prefix) => {
  const healthPrefix = `${prefix}/health`;

  app.get(`${healthPrefix}/ping.json`, ping);
};
